<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>值得收藏的10个jquery小技巧 | haijd</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  <meta name="keywords" content="转载jQuery" />
  
  
  
  
  <meta name="description" content="值得收藏的10个jQuery小技巧">
<meta name="keywords" content="转载,jQuery">
<meta property="og:type" content="article">
<meta property="og:title" content="值得收藏的10个jQuery小技巧">
<meta property="og:url" content="http://www.hais2.com/2016/03/25/Collector-10-jQuery-tips/index.html">
<meta property="og:site_name" content="haijd">
<meta property="og:description" content="值得收藏的10个jQuery小技巧">
<meta property="og:locale" content="default">
<meta property="og:updated_time" content="2018-06-14T05:51:08.473Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="值得收藏的10个jQuery小技巧">
<meta name="twitter:description" content="值得收藏的10个jQuery小技巧">
  
    <link rel="alternate" href="/atom.xml" title="haijd" type="application/atom+xml">
  
  <link rel="icon" href="/css/images/favicon.ico">
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Montserrat:700" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic" rel="stylesheet" type="text/css">
  <link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
  <style type="text/css">
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/9749f0/00000000000000000001008f/27/l?subset_id=2&fvd=n5) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/90cf9f/000000000000000000010091/27/l?subset_id=2&fvd=n7) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/8a5494/000000000000000000013365/27/l?subset_id=2&fvd=n4) format("woff2");font-weight:lighter;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/d337d8/000000000000000000010095/27/l?subset_id=2&fvd=i4) format("woff2");font-weight:400;font-style:italic;}</style>
    
  <link rel="stylesheet" id="athemes-headings-fonts-css" href="//fonts.googleapis.com/css?family=Yanone+Kaffeesatz%3A200%2C300%2C400%2C700&amp;ver=4.6.1" type="text/css" media="all">
  <link rel="stylesheet" href="/css/style.css">

  <script src="/js/jquery-3.1.1.min.js"></script>

  <!-- Bootstrap core CSS -->
  <link rel="stylesheet" href="/css/bootstrap.css" >
  <link rel="stylesheet" href="/css/hiero.css" >
  <link rel="stylesheet" href="/css/glyphs.css" >
  
    <link rel="stylesheet" href="/css/vdonate.css" >
  

</head>

<script>
var themeMenus = {};

  themeMenus["/"] = "Home"; 

  themeMenus["/archives"] = "Archives"; 

  themeMenus["/categories"] = "Categories"; 

  themeMenus["/tags"] = "Tags"; 

  themeMenus["/about"] = "About"; 

</script>


  <body data-spy="scroll" data-target="#toc" data-offset="50">


  <header id="allheader" class="site-header" role="banner">
  <div class="clearfix container">
      <div class="site-branding">

          <h1 class="site-title">
            
              <a href="/" title="haijd" rel="home"> haijd </a>
            
          </h1>

          
            <div class="site-description">Stay Hungry,Stay Foolish</div>
          
            
          <nav id="main-navigation" class="main-navigation" role="navigation">
            <a class="nav-open">Menu</a>
            <a class="nav-close">Close</a>
            <div class="clearfix sf-menu">

              <ul id="main-nav" class="nmenu sf-js-enabled">
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/">Home</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/archives">Archives</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/categories">Categories</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/tags">Tags</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/about">About</a> </li>
                    
              </ul>
            </div>
          </nav>


      </div>
  </div>
</header>




  <div id="container">
    <div id="wrap">
            
      <div id="content" class="outer">
        
          <section id="main" style="float:none;"><article id="post-Collector-10-jQuery-tips" style="width: 66%; float:left;" class="article article-type-post" itemscope itemprop="blogPost" >
  <div id="articleInner" class="clearfix post-1016 post type-post status-publish format-standard has-post-thumbnail hentry category-template-2 category-uncategorized tag-codex tag-edge-case tag-featured-image tag-image tag-template">
    
    
      <header class="article-header">
        
  
    <h1 class="thumb" class="article-title" itemprop="name">
      值得收藏的10个jQuery小技巧
    </h1>
  

      </header>
    
    <div class="article-meta">
      
	Posted on <a href="/2016/03/25/Collector-10-jQuery-tips/" class="article-date">
	  <time datetime="2016-03-25T13:25:54.000Z" itemprop="datePublished">March 25, 2016</time>
	</a>

      
	<span id="busuanzi_container_page_pv">
	  本文总阅读量<span id="busuanzi_value_page_pv"></span>次
	</span>

    </div>
    <div class="article-entry" itemprop="articleBody">
      
        <p>转载自<a href="http://www.imooc.com/article/1686" target="_blank" rel="noopener">慕课网</a></p>
<h3 id="1-返回顶部按钮"><a href="#1-返回顶部按钮" class="headerlink" title="1.返回顶部按钮"></a>1.返回顶部按钮</h3><p>你可以利用 animate 和 scrollTop 来实现返回顶部的动画，而不需要使用其他插件。<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// Back to top</span></span><br><span class="line">$(<span class="string">'a.top'</span>).click(<span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">  $(<span class="built_in">document</span>.body).animate(&#123;<span class="attr">scrollTop</span>: <span class="number">0</span>&#125;, <span class="number">800</span>);</span><br><span class="line">  <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line">&#125;);</span><br><span class="line">&lt;!-- Create an anchor tag --&gt;</span><br><span class="line">&lt;a <span class="class"><span class="keyword">class</span></span>=<span class="string">"top"</span> href=<span class="string">"#"</span>&gt;Back to top&lt;<span class="regexp">/a&gt;</span></span><br></pre></td></tr></table></figure></p>
<p>改变 scrollTop 的值可以调整返回距离顶部的距离，而 animate 的第二个参数是执行返回动作需要的时间(单位：毫秒)。<br><a id="more"></a></p>
<h3 id="2-预加载图片"><a href="#2-预加载图片" class="headerlink" title="2.预加载图片"></a>2.预加载图片</h3><p>如果你的页面中使用了很多不可见的图片（如：hover 显示），你可能需要预加载它们：<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">$.preloadImages = <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">  <span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; <span class="built_in">arguments</span>.length; i++) &#123;</span><br><span class="line">    $(<span class="string">'&lt;img&gt;'</span>).attr(<span class="string">'src'</span>, <span class="built_in">arguments</span>[i]);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line">$.preloadImages(<span class="string">'img/hover1.png'</span>, <span class="string">'img/hover2.png'</span>);</span><br></pre></td></tr></table></figure></p>
<h3 id="3-检查图片是否加载完成"><a href="#3-检查图片是否加载完成" class="headerlink" title="3.检查图片是否加载完成"></a>3.检查图片是否加载完成</h3><p>有时候你需要确保图片完成加载完成以便执行后面的操作：<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$(<span class="string">'img'</span>).load(<span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">  <span class="built_in">console</span>.log(<span class="string">'image load successful'</span>);</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure></p>
<p>你可以把 img 替换为其他的 ID 或者 class 来检查指定图片是否加载完成</p>
<h3 id="4-自动修改破损图像"><a href="#4-自动修改破损图像" class="headerlink" title="4.自动修改破损图像"></a>4.自动修改破损图像</h3><p>如果你碰巧在你的网站上发现了破碎的图像链接，你可以用一个不易被替换的图像来代替它们。添加这个简单的代码可以节省很多麻烦：<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$(<span class="string">'img'</span>).on(<span class="string">'error'</span>, <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">  $(<span class="keyword">this</span>).prop(<span class="string">'src'</span>, <span class="string">'img/broken.png'</span>);</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure></p>
<p>即使你的网站没有破碎的图像链接，添加这段代码也没有任何害处。</p>
<h3 id="5-鼠标悬停-hover-切换-class-属性"><a href="#5-鼠标悬停-hover-切换-class-属性" class="headerlink" title="5.鼠标悬停(hover)切换 class 属性"></a>5.鼠标悬停(hover)切换 class 属性</h3><p>假如当用户鼠标悬停在一个可点击的元素上时，你希望改变其效果，下面这段代码可以在其悬停在元素上时添加 class 属性，当用户鼠标离开时，则自动取消该 class 属性：<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">$(<span class="string">'.btn'</span>).hover(<span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">  $(<span class="keyword">this</span>).addClass(<span class="string">'hover'</span>);</span><br><span class="line">  &#125;, <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">    $(<span class="keyword">this</span>).removeClass(<span class="string">'hover'</span>);</span><br><span class="line">  &#125;);</span><br></pre></td></tr></table></figure></p>
<p>你只需要添加必要的CSS代码即可。如果你想要更简洁的代码，可以使用 toggleClass 方法：<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$(<span class="string">'.btn'</span>).hover(<span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123; </span><br><span class="line">  $(<span class="keyword">this</span>).toggleClass(<span class="string">'hover'</span>); </span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure></p>
<p>注：直接使用CSS实现该效果可能是更好的解决方案，但你仍然有必要知道该方法。</p>
<h3 id="6-禁用-input-字段"><a href="#6-禁用-input-字段" class="headerlink" title="6.禁用 input 字段"></a>6.禁用 input 字段</h3><p>有时你可能需要禁用表单的 submit 按钮或者某个 input 字段，直到用户执行了某些操作（例如，检查“已阅读条款”复选框）。可以添加 disabled 属性，直到你想启用它时：<br><figure class="highlight scala"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$(<span class="symbol">'input</span>[<span class="class"><span class="keyword">type</span></span>=<span class="string">"submit"</span>]').prop(<span class="symbol">'disable</span>d', <span class="literal">true</span>);</span><br></pre></td></tr></table></figure></p>
<p>你要做的就是执行 removeAttr 方法，并把要移除的属性作为参数传入：<br><figure class="highlight scala"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$(<span class="symbol">'input</span>[<span class="class"><span class="keyword">type</span></span>=<span class="string">"submit"</span>]').removeAttr(<span class="symbol">'disable</span>d');</span><br></pre></td></tr></table></figure></p>
<h3 id="7-阻止链接加载"><a href="#7-阻止链接加载" class="headerlink" title="7.阻止链接加载"></a>7.阻止链接加载</h3><p>有时你不希望链接到某个页面或者重新加载它，你可能希望它来做一些其他事情或者触发一些其他脚本，你可以这么做：<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$(<span class="string">'a.no-link'</span>).click(<span class="function"><span class="keyword">function</span> (<span class="params">e</span>) </span>&#123;</span><br><span class="line">  e.preventDefault();</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure></p>
<h3 id="8-切换-fade-slide"><a href="#8-切换-fade-slide" class="headerlink" title="8.切换 fade/slide"></a>8.切换 fade/slide</h3><p>fade 和 slide 是我们在 jQuery 中经常使用的动画效果，它们可以使元素显示效果更好。但是如果你希望元素显示时使用第一种效果，而消失时使用第二种效果，则可以这么做：<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// Fade</span></span><br><span class="line">$(<span class="string">'.btn'</span>).click(<span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">  $(<span class="string">'.element'</span>).fadeToggle(<span class="string">'slow'</span>);</span><br><span class="line">&#125;);</span><br><span class="line"><span class="comment">// Toggle</span></span><br><span class="line">$(<span class="string">'.btn'</span>).click(<span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">  $(<span class="string">'.element'</span>).slideToggle(<span class="string">'slow'</span>);</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure></p>
<h3 id="9-简单的手风琴效果"><a href="#9-简单的手风琴效果" class="headerlink" title="9.简单的手风琴效果"></a>9.简单的手风琴效果</h3><p>这是一个实现手风琴效果快速简单的方法：<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// Close all panels</span></span><br><span class="line">$(<span class="string">'#accordion'</span>).find(<span class="string">'.content'</span>).hide();</span><br><span class="line"><span class="comment">// Accordion</span></span><br><span class="line">$(<span class="string">'#accordion'</span>).find(<span class="string">'.accordion-header'</span>).click(<span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">  <span class="keyword">var</span> next = $(<span class="keyword">this</span>).next();</span><br><span class="line">  next.slideToggle(<span class="string">'fast'</span>);</span><br><span class="line">  $(<span class="string">'.content'</span>).not(next).slideUp(<span class="string">'fast'</span>);</span><br><span class="line">  <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure></p>
<h3 id="10-让两个-DIV-高度相同"><a href="#10-让两个-DIV-高度相同" class="headerlink" title="10.让两个 DIV 高度相同"></a>10.让两个 DIV 高度相同</h3><p>有时你需要让两个 div 高度相同，而不管它们里面的内容多少。可以使用下面的代码片段：<br><figure class="highlight maxima"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">var</span> $<span class="built_in">columns</span> = $('.column');</span><br><span class="line"><span class="built_in">var</span> <span class="built_in">height</span> = <span class="number">0</span>;</span><br><span class="line">$<span class="built_in">columns</span>.each(function () &#123;</span><br><span class="line">  <span class="keyword">if</span> ($(this).<span class="built_in">height</span>() &gt; <span class="built_in">height</span>) &#123;</span><br><span class="line">    <span class="built_in">height</span> = $(this).<span class="built_in">height</span>();</span><br><span class="line">  &#125;</span><br><span class="line">&#125;);</span><br><span class="line">$<span class="built_in">columns</span>.<span class="built_in">height</span>(<span class="built_in">height</span>);</span><br></pre></td></tr></table></figure></p>
<p>这段代码会循环一组元素，并设置它们的高度为元素中的最大高。</p>

      
    </div>
    <footer class="entry-meta entry-footer">
      
	<span class="ico-folder"></span>
    <a class="article-category-link" href="/categories/Frontend/">Frontend</a>

      
  <span class="ico-tags"></span>
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/jQuery/">jQuery</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/转载/">转载</a></li></ul>

      
        <div id="donation_div"></div>

<script src="/js/vdonate.js"></script>
<script>
var a = new Donate({
  title: '如果觉得我的文章对您有用，请随意打赏。您的支持将鼓励我继续创作!', // 可选参数，打赏标题
  btnText: 'Donate', // 可选参数，打赏按钮文字
  el: document.getElementById('donation_div'),
  wechatImage: '/css/images/wechatPay.png',
  alipayImage: '/css/images/alipay.jpg'
});
</script>
      

      
        
	<section id="comments" class="comment">
	  <div id="disqus_thread">
	  <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
	  </div>
	</section>

	<script type="text/javascript">
	var disqus_shortname = 'haijdblog';
	(function(){
	  var dsq = document.createElement('script');
	  dsq.type = 'text/javascript';
	  dsq.async = true;
	  dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
	  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	}());
	(function(){
	  var dsq = document.createElement('script');
	  dsq.type = 'text/javascript';
	  dsq.async = true;
	  dsq.src = '//' + disqus_shortname + '.disqus.com/count.js';
	  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	}());
	</script>


      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2016/03/25/What-is-a-real-programming-skills/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          什么才算是真正的编程能力？
        
      </div>
    </a>
  
  
    <a href="/2016/03/20/Ashx-pages-use-Session/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">在ashx页中使用Session</div>
    </a>
  
</nav>

  
</article>

<!-- Table of Contents -->

  <aside id="sidebar">
    <div id="toc" class="toc-article">
    <strong class="toc-title">Contents</strong>
    
      <ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-返回顶部按钮"><span class="nav-number">1.</span> <span class="nav-text">1.返回顶部按钮</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-预加载图片"><span class="nav-number">2.</span> <span class="nav-text">2.预加载图片</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-检查图片是否加载完成"><span class="nav-number">3.</span> <span class="nav-text">3.检查图片是否加载完成</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-自动修改破损图像"><span class="nav-number">4.</span> <span class="nav-text">4.自动修改破损图像</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#5-鼠标悬停-hover-切换-class-属性"><span class="nav-number">5.</span> <span class="nav-text">5.鼠标悬停(hover)切换 class 属性</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#6-禁用-input-字段"><span class="nav-number">6.</span> <span class="nav-text">6.禁用 input 字段</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#7-阻止链接加载"><span class="nav-number">7.</span> <span class="nav-text">7.阻止链接加载</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#8-切换-fade-slide"><span class="nav-number">8.</span> <span class="nav-text">8.切换 fade/slide</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#9-简单的手风琴效果"><span class="nav-number">9.</span> <span class="nav-text">9.简单的手风琴效果</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#10-让两个-DIV-高度相同"><span class="nav-number">10.</span> <span class="nav-text">10.让两个 DIV 高度相同</span></a></li></ol>
    
    </div>
  </aside>
</section>
        
      </div>
      <footer id="footer" class="site-footer">
  

  <div class="clearfix container">
      <div class="site-info">
	      &copy; 2018 haijd All Rights Reserved.
          
            <span id="busuanzi_container_site_uv">
              本站访客数<span id="busuanzi_value_site_uv"></span>人次  
              本站总访问量<span id="busuanzi_value_site_pv"></span>次
            </span>
          
      </div>
      <div class="site-credit">
        Theme by <a href="https://github.com/iTimeTraveler/hexo-theme-hiero" target="_blank">hiero</a>
      </div>
  </div>
</footer>


<!-- min height -->

<script>
    var contentdiv = document.getElementById("content");

    contentdiv.style.minHeight = document.body.offsetHeight - document.getElementById("allheader").offsetHeight - document.getElementById("footer").offsetHeight + "px";
</script>
    </div>
    <!-- <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
    <a href="/categories" class="mobile-nav-link">Categories</a>
  
    <a href="/tags" class="mobile-nav-link">Tags</a>
  
    <a href="/about" class="mobile-nav-link">About</a>
  
</nav> -->
    

<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/scripts.js"></script>
<script src="/js/bootstrap.js"></script>
<script src="/js/main.js"></script>








	<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
	</script>






  </div>

  <a id="rocket" href="#top" class=""></a>
  <script type="text/javascript" src="/js/totop.js" async=""></script>
</body>
</html>
